import api from "@/api";
import { PORT } from "../config/servicePort";

/**
 * 获取月台列表
 */
export const getDockList = (data: any) => api.post(`${PORT}/api/dispatcher/scene/page`, data);

// 创建月台
export const createDock = (data: any) => api.post(`${PORT}/api/dispatcher/scene/save`, data);
// 更新月台
export const updateDock = (data: any) => api.post(`${PORT}/api/dispatcher/scene/update`, data);
// 获取月台详情
export const getDockDetail = (data: any) => api.post(`${PORT}/api/dispatcher/scene/${data.id}`);
// 删除月台
export const deleteDock = (data: any) => api.post(`${PORT}/api/dispatcher/scene/delete/${data.id}`);
// 解绑接驳点
export const unbindJoint = (data: any) => api.post(`${PORT}/api/dispatcher/site/unbind/${data.id}`);



// 获取接驳点列表
export const getJointList = (data?: any) => api.post(`${PORT}/api/dispatcher/site/page`, data);
// 新增接驳点
export const createJoint = (data?: any) => api.post(`${PORT}/api/dispatcher/site/save`, data);
// 修改接驳点
export const updateJoint = (data?: any) => api.post(`${PORT}/api/dispatcher/site/update`, data);
// 获取接驳点详情
export const getJointDetail = (data?: any) => api.post(`${PORT}/api/dispatcher/site/${data.id}`);
// 获取全量接驳点列表
export const getAllJoint = (data?: any) => api.post(`${PORT}/api/dispatcher/site/page`, data);
// 删除接驳点
export const deleteJoint = (data?: any) => api.post(`${PORT}/api/dispatcher/site/delete/${data.id}`);


// 获取接驳点列表
// export const getRouteList = (data?: any) => api.post(`${PORT}/api/dispatcher/route/list`, data);
// 分页获取路线列表
export const getRouteList = (data?: any) => api.post(`${PORT}/api/dispatcher/route/page`, data);
// 上传路线
export const uploadRoute = (data?: any) => api.post(`${PORT}/api/system/uploadMultiple`, data);
// 添加路线
export const addRoute = (data?: any) => api.post(`${PORT}/api/dispatcher/route/add`, data);
// 编辑路线
export const editRoute = (data?: any) => api.post(`${PORT}/api/dispatcher/route/edit`, data);
// 获取路线详情
export const getRouteDetail = (data?: any) => api.post(`${PORT}/api/dispatcher/route/${data.id}`);
// 删除路线
export const deleteRoute = (data?: any) => api.post(`${PORT}/api/dispatcher/route/delete/${data.id}`);
// 根据场景ID获取路线列表
export const getPathByScID = (data?: any) => api.post(`${PORT}/api/dispatcher/route/listByScene/${data.id}`);
